#ifndef __DIRENT_H__
#define __DIRENT_H__

#ifndef DIRSIZ
#define DIRSIZ		14
#endif
#define MAX_PATH 	1024
#define NAME_MAX	14	// longest filename component;
				// system-dependent
typedef struct 			// portable directory entry
{		
	long ino;		// inode number
	char name[NAME_MAX+1];	// name + '\0' terminator		
}Dirent;

typedef struct 			// minimal DIR: no buffering, etc
{
	int fd;			// file descriptor for the directory
	Dirent d;		// the directory entry
}myDIR;

void fsize(char *);
myDIR *myopendir(char *dirname);
void myclosedir(myDIR *dp);
Dirent *myreaddir(myDIR *dp);

static void dirwalk(char *, void (*fun)(char *));

#endif
